# -*- coding: utf-8 -*-
# @Time : 2021/2/19 18:55
# @Author : zhangcheng
# @Software: PyCharm


import tornado.httpserver
import tornado.web
import tornado.ioloop
import tornado.escape
from tornado.options import define, options
from handler.handlers_urls import handlers

define("port", default=8000, help="run port", type=int)


if __name__ == '__main__':
    options.parse_command_line()
    app = tornado.web.Application(handlers)
    http_server = tornado.httpserver.HTTPServer(app)
    http_server.listen(options.port)
    print("start server...")
    tornado.ioloop.IOLoop.current().start()